#!/usr/bin/python
# coding=utf-8

import plotly.plotly
import plotly.graph_objs as go


class FilledAreaPlots:
    def __init__(self):
        print "欢迎使用等高线生成图标"

    def makePlots(self, x, y1, y2, filename):
        trace0 = go.Scatter(
                x=x,
                y=y1,
                fill="tozeroy",
                mode='lines',
                line=dict(
                        color='rgb(0, 47, 167)',
                )
        )
        trace1 = go.Scatter(
                x=x,
                y=y2,
                fill="tonexty",
                mode='lines',
                line=dict(
                        color='rgb(143, 19, 131)',
                )
        )
        data = [trace0, trace1]
        plotly.offline.plot(data, filename=filename + ".html")


if __name__ == "__main__":
    plot = FilledAreaPlots()
    # plot.makePlots()